build: Add --enable-triggers-only
authorColin Walters <walters@verbum.org>
Sun, 26 Aug 2012 16:46:14 +0000 (12:46 -0400)
committerColin Walters <walters@verbum.org>
Sun, 26 Aug 2012 17:58:23 +0000 (13:58 -0400)
For bootstrapping gnome-ostree, we need to install the triggers early
on, before we actually build the real ostree binary.

Makefile-daemon.am
Makefile-libostree.am
Makefile-ostadmin.am
Makefile-ostree.am
Makefile-otutil.am
Makefile-switchroot.am
Makefile.am
configure.ac

index aab7e408c1e1d226117e4831ac8ee7e07760c86a..3a9d718725082112385e800b06d288d29347050a 100644 (file)
@@ -17,7 +17,9 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+if !TRIGGERS_ONLY
 libexec_PROGRAMS += ostreed
+endif
 
 ostreed_SOURCES = src/daemon/ostreed.c \
        src/daemon/ot-daemon.h \
index 89e7b191bbc232a036ef6db787c8dfef9f380522..e4dadaeab46529d2c2416723452c47ca48e4a0d6 100644 (file)
@@ -17,7 +17,9 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+if !TRIGGERS_ONLY
 privlib_LTLIBRARIES += libostree.la
+endif
 
 libostree_la_SOURCES = src/libostree/ostree.h \
        src/libostree/ostree-core.c \
@@ -56,4 +58,4 @@ libostree_la_LIBADD += $(OT_DEP_LIBARCHIVE_LIBS)
 endif
 
 install-data-hook:
-       rm $(DESTDIR)$(privlibdir)/libostree.la
+       rm -f $(DESTDIR)$(privlibdir)/libostree.la
index 76df1cb36dd21f5f0e30de1ce247532f8f1b2189..636e2194ecdd38fd68654ca4874022ef3a9f9901 100644 (file)
@@ -15,7 +15,9 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+if !TRIGGERS_ONLY
 bin_PROGRAMS += ostadmin
+endif
 
 ostadmin_SOURCES = src/ostadmin/main.c \
        src/ostadmin/ot-admin-builtins.h \
index 1356fdd73a5a7e0d3f84803e407502a5e8d537ad..571b07f0a9dbe3f4784c8571a9e138f270f6c06f 100644 (file)
@@ -17,7 +17,9 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+if !TRIGGERS_ONLY
 bin_PROGRAMS += ostree
+endif
 
 ostree_SOURCES = src/ostree/main.c \
        src/ostree/ot-builtins.h \
index 4855e5eaf7bc706312d7600b457c0893d3a33823..84fe14afb32ddcf17a8a2f47a753b02ec65de57d 100644 (file)
@@ -17,7 +17,9 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+if !TRIGGERS_ONLY
 noinst_LTLIBRARIES += libotutil.la
+endif
 
 libotutil_la_SOURCES = \
        src/libotutil/ot-checksum-utils.c \
index 34000571ddfa6f3e18c6c53740384c9805744f17..cf2cc54cd3f58cca641be4e84a1068a96f32c01d 100644 (file)
@@ -15,7 +15,9 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+if !TRIGGERS_ONLY
 sbin_PROGRAMS += ostree-switch-root
+endif
 
 ostree_switch_root_SOURCES = src/switchroot/ostree-switch-root.c
 
index d3d3a7e895110cb8adb9de2ab1998e98d441a7a4..beeb1d0d5ea8857ee63f885f1fd3b987e7a55e9f 100644 (file)
@@ -71,7 +71,9 @@ endif
 libgsystem_srcpath := src/libgsystem
 libgsystem_cflags = $(OT_INTERNAL_GIO_UNIX_CFLAGS)
 libgsystem_libs = $(OT_INTERNAL_GIO_UNIX_LIBS)
+if !TRIGGERS_ONLY
 include src/libgsystem/Makefile-libgsystem.am
+endif
 include Makefile-daemon.am
 include Makefile-otutil.am
 include Makefile-libostree.am
index 9f0bca310511d75f9d7c47380902ca320901a963..767caec0bbbe13a5fbbbb4fa3197852af40d5da8 100644 (file)
@@ -27,6 +27,11 @@ AC_SUBST(WARN_CFLAGS)
 LT_PREREQ([2.2.4])
 LT_INIT([disable-static])
 
+AC_ARG_ENABLE(triggers-only,
+           AS_HELP_STRING([--enable-triggers-only], [Only build and install triggers]),,
+           enable_triggers_only=no)
+AM_CONDITIONAL(TRIGGERS_ONLY, test x$enable_triggers_only != xno)
+
 AC_CHECK_HEADER([attr/xattr.h],,[AC_MSG_ERROR([You must have attr/xattr.h from libattr])])
 
 PKG_PROG_PKG_CONFIG
@@ -46,6 +51,9 @@ AS_IF([test x$enable_embedded_dependencies = xyes], [
   AC_ARG_WITH(soup,
            AS_HELP_STRING([--with-soup], [Use libsoup @<:@default=yes@:>@]),
            [], [with_soup=check])
+  if test x$enable_triggers_only != xno; then
+    with_soup=no
+  fi
   AS_IF([test x$with_soup != xno ], [
     AC_MSG_CHECKING([for $SOUP_DEPENDENCY])
     PKG_CHECK_EXISTS($SOUP_DEPENDENCY, have_soup=yes, have_soup=no)
@@ -59,7 +67,7 @@ AS_IF([test x$enable_embedded_dependencies = xyes], [
     ], [
        with_soup=no
     ])
-  ])
+  ], [ with_soup=no ])
 ])
 AM_CONDITIONAL(USE_LIBSOUP, test x$with_soup != xno)
 
@@ -69,6 +77,9 @@ AC_ARG_ENABLE(documentation,
               AC_HELP_STRING([--enable-documentation],
                              [build documentation]),,
               enable_documentation=yes)
+if test x$enable_triggers_only != xno; then
+   enable_documentation=no
+fi
 if test x$enable_documentation = xyes; then
    AC_PATH_PROG([XSLTPROC], [xsltproc])
    if test x$XSLTPROC = x; then
@@ -80,7 +91,7 @@ AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes)
 AC_ARG_WITH(libarchive,
            AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
            :, with_libarchive=maybe)
-AS_IF([ test x$with_libarchive != xno ], [
+AS_IF([ test x$with_libarchive != xno && test x$enable_triggers_only != xno ], [
     AC_MSG_CHECKING([for $LIBARCHIVE_DEPENDENCY])
     PKG_CHECK_EXISTS($LIBARCHIVE_DEPENDENCY, have_libarchive=yes, have_libarchive=no)
     AC_MSG_RESULT([$have_libarchive])
@@ -94,10 +105,10 @@ AS_IF([ test x$with_libarchive != xno ], [
     ], [
        with_libarchive=no
     ])
-])
+], [ with_libarchive=no ])
 AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no)
 
-AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel],
+AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel && test x$enable_triggers_only != xno ],
       [kernel_updates_default=yes],
       [kernel_updates_default=no])
 
@@ -119,8 +130,10 @@ echo "
     ===============
 
 
+    triggers only: $enable_triggers_only
     embedded dependencies: $enable_embedded_dependencies
     libsoup (retrieve remote HTTP repositories): $with_soup
     libarchive (parse tar files directly): $with_libarchive
+    documentation: $enable_documentation
     kernel updates integration: $enable_kernel_updates
 "